package com.ffggffgfv.backend.dto;

/**
 * 货架查询条件数据传输对象
 */
public class ShelfQueryDTO {

    private String name;          // 货架名称（模糊查询）
    private String location;      // 位置信息（模糊查询）
    private Long merchantId;      // 商家ID
    private Integer status;       // 状态
    private Integer pageNum;      // 页码
    private Integer pageSize;     // 每页大小

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getPageNum() {
        return pageNum == null || pageNum < 1 ? 1 : pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize == null || pageSize < 1 ? 10 : (pageSize > 100 ? 100 : pageSize);
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
